package me.hacket.netrequestpro.bean;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.ArrayList;
import java.util.List;

import android.support.annotation.IntDef;
import android.support.annotation.NonNull;

public class LogMessageRequest {

    public static final String LOG_SEPERATOR = " <---> ";

    public List<LogUploadLevel> log = new ArrayList<>();

    public static class LogUploadLevel {

        @LogUploadLevel.LOG_UPLOAD_LEVEL
        public int level;

        public String content;

        public LogUploadLevel(@LogUploadLevel.LOG_UPLOAD_LEVEL int level, @NonNull String content) {
            this.level = level;
            this.content = content;
        }

        public static final int L_INFO = 0;
        public static final int L_WARNING = 1;
        public static final int L_ERROR = 2;
        public static final int L_FATAL = 3;

        @IntDef({L_INFO, L_WARNING, L_ERROR, L_FATAL})
        @Documented
        @Target({ElementType.LOCAL_VARIABLE, ElementType.FIELD, ElementType.PARAMETER})
        @Retention(RetentionPolicy.SOURCE)
        public @interface LOG_UPLOAD_LEVEL {
        }
    }

}
